package com.zx.rabbitmqconsumer.service.direct;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;


/**
 * @author Zx
 * @date 2021/6/1 9:30
 */
@Service
public class DirectConsumer {
    @RabbitListener(queues = {"email.direct.queue"})
    public void receiveEmailMsg(String message) {
        System.out.println("email Direct 接收到订单: - > " + message);
    }

    @RabbitListener(queues = {"sms.direct.queue"})
    public void receiveSmsMsg(String message) {
        System.out.println("sms Direct 接收到订单: - > " + message);
    }
}
